{% load staticfiles %}
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <title>运维平台</title>
        <link rel="stylesheet" href="{% static 'css/layui.css' %}">
        <link rel="stylesheet" href="{% static 'css/abnormal.css' %}">
        <style>

        </style>
    </head>
    <body>
        <div class="public_div">
            <div  id="ab-left" class="ab-left">
                <div  class="ab-left-top">
                    <form id="formablist" name="formablist" class="layui-form">
                        <div class="layui-form-item ab-select-all" >
                            <div id="module_name_div" class="layui-input-block" style="margin-left:0">
                                <select name="servertype"  lay-filter="system_type_one" lay-verify="" >
                                    <option value="">服务器类型</option>
                                    <option value="1">windows</option>
                                    <option value="2">linux</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-item ab-select-all">
                            <div id="module_name_one_div" class="layui-input-block" style="margin-left:0">
                                <select id="module_name_one" name="module_name" lay-filter="module_name_one" lay-verify="" >
                                    <option value="">功能模块</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-item ab-select-all">
                            <div id="module_name_two_div" class="layui-input-block" style="margin-left:0">
                                <input id="abnormal_paper_div" type="text" name="abnormal_paper" placeholder="异常查询" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item ab-select-all">
                            <div class="layui-input-block" style="margin-left:0">
                                <button type="button" class="layui-btn" lay-submit lay-filter="query_sel">查询</button>
                                <button id="sel_resets" type="reset" class="layui-btn layui-btn-primary" lay-filter="sel_resets">重置</button>
                            </div>
                        </div>
                    </form>
                </div>
                <div  class="ab-left-bottom">
                    <table class="layui-table layui-table-ablist" id="ab_list" lay-filter="ab_list" style="z-index: 0;"></table>
                </div>
            </div>
            <div  class="ab-right-one">
                <blockquote class="layui-elem-quote layui-quote-nm" style="height: 100%;">
                    <div style="margin: 0 0 5px 0;">
                        <span style="font-size: 25px; ">异常添加</span>
                    </div>
                    <form id="ab_add" name="ab_add" class="layui-form layui-form-pane" action="" style="height: 92%;">
                        <div class="layui-form-item form-item-select" style="clear: none;">
                            <label class="layui-form-label" >系统及模块</label>
                            <div class="layui-input-inline" style="width: 32%; ">
                                <select id="system_two" name="system_type" lay-filter="system_type_two" lay-verify="required">
                                    <option value="">服务器类型</option>
                                    <option value="1">windows</option>
                                    <option value="2">linux</option>
                                </select>
                            </div>
                            <div id="module_name_select" class="layui-input-inline" style="width: 35%;float: right; margin-left: 0;">
                                <select id="module_name_two" name="module_name_select" lay-filter="module_name_select" lay-search="">
                                    <option value="">模块选择</option>
                                </select>
                                <input id="module_name" type="text" name="module_name"  lay-verify="required" placeholder="模块名称" autocomplete="off" class="layui-input" style="display: none;">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">服务器地址</label>
                            <div class="layui-input-block">
                                <input id="ip_addr" type="text" name="ip_addr" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">异常简述</label>
                            <div class="layui-input-block">
                                <input id="abnormal_paper" type="text" name="abnormal_paper" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item layui-form-text" style="height: 40%;">
                            <label class="layui-form-label">异常详述</label>
                            <div class="layui-input-block" style="height:40%; ">
                                <textarea id="abnormal_des" name="abnormal_des" lay-verify="required" placeholder="请输入内容" class="layui-textarea" style="height:100%"></textarea>
                            </div>
                            <label class="layui-form-label" style="margin-top:15px;">解决方式</label>
                            <div class="layui-input-block" style="height:40%;">
                                <textarea id="solution" name="solution" lay-verify="required" placeholder="请输入内容" class="layui-textarea" style="height:100%"></textarea>
                            </div>
                            <div style="text-align: center; margin-top: 28px;">
                                <a id="excelname" href="{% static 'user.xlsx' %}" ><button type="button" id="excelsubmit" class="layui-btn" download>生成Excel</button></a>
                                <button type="button" id="absubmit" class="layui-btn" lay-submit lay-filter="absubmit">提交</button>
                                <button type="button" id="abmodify" class="layui-btn layui-hide" lay-submit lay-filter="abmodify">修改</button>
                                <button id="cancel" type="reset" class="layui-btn layui-btn-primary layui-hide" lay-filter="cancel">取消</button>
                                <button id="resets" type="reset" class="layui-btn layui-btn-primary" lay-filter="resets">重置</button>
                            </div>
                            
                        </div>
                    </form>
                </blockquote>
            </div>
            <div  class="ab-right-two">
                <fieldset class="layui-elem-field" style="height: 100%;">
                    <legend>查看</legend>
                    <div class="layui-field-box" >
                        <div style="float: left; width: 50%;"><span class="statis-span">系统类型：</span><span class="statis-span-data">无</span></div><div><span class="statis-span">模块名称：</span><span class="statis-span-data">无</span></div>
                        <hr class="layui-bg-cyan">
                        <span class="statis-span">异常简述</span><br>
                        <div style="word-wrap:break-word;word-break:break-all ; white-space:normal; margin: 10px 0 10px 0;">
                              <span class="statis-span-data" style="display:table; ">无</span>
                        </div>
                        <hr class="layui-bg-cyan">
                        <span class="statis-span">异常详述</span><br>
                        <div style="word-wrap:break-word;word-break:break-all ; white-space:normal; margin: 10px 0 10px 0;">
                            <span class="statis-span-data">无</span>
                        </div>
                        <hr class="layui-bg-cyan">

                        <span class="statis-span">解决方案</span><br>
                        <div style="word-wrap:break-word;word-break:break-all ; white-space:normal; margin: 10px 0 10px 0;">
                            <span class="statis-span-data">无</span>
                        </div>
                        <hr class="layui-bg-cyan">
                        <div class="bottom-sum-add">
                            <div class="sum-add-left" style="text-align: center;">
                                <div style="position: relative; top: 50%; transform: translateY(-50%)">
                                    <span class="statis-span">发生次数：</span><span id="num_data" class="statis-span-data statis-span-num">无</span>
                                </div>
                            </div>
                            <div class="sum-add-right" style="text-align: center;line-height: 112px;">
                                <span id="sum_add" title="增加" class="handle-btn">
                                    <i class="layui-icon" style="font-size: 45px; color: #1E9FFF;">&#xe654;</i>
                                </span>
                                <span id="sum_return" title="返回" class="handle-btn">
                                    <i class="layui-icon" style="font-size: 45px; color: #1E9FFF;">&#x1006;</i>
                                </span>
                            </div>

                        </div>
                    </div>
                </fieldset>

            </div>
        </div>

        <script type="text/javascript">
            var sel_win = {{ sel_win | safe }};
            var sel_linux = {{ sel_linux | safe }};
            var table_data = {{ table_data | safe }};
        </script>
        <script src="{% static 'layui.all.js' %}"></script>

        <script type="text/html" id="absDemo">
            <a class="layui-btn layui-btn-xs" lay-event="check">查看</a>
            <a class="layui-btn layui-btn-xs" lay-event="modify">修改</a>
            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>
        </script>
        <script src="{% static 'js/abnormal/abstatistical.js' %}"></script>
    </body>
</html>